package util;


public class Variable {
	private Object value;
	private Type type;
	private String name;
	
	public Type getType() {
		return type;
	}
	
	public String getName() {
		return name;
	}

	public String getTypename(){
		return type.toString();
	}

	public Variable(String name, Type type) {
		this.name = name;
		this.type = type;
	}
	
	public Variable(Attribute attribute){
		name = attribute.getName();
		type = attribute.getType();
	}

	public Object getValue() {
		return value;
	}

	public boolean isArray() {
		return type.isArray();
	}

	public int getArraySize() {
		return type.getArraySize();
	}

	public void setValue(Object value) {
		this.value = value;
	}
}
